package com.ymatou.iapi.godmch.service;



import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*获取商户代理价加价配置Call
*FreeMaker Template自动生成代码
*/
public class getAgentPriceMarkupConfigCall extends YmatouBaseCall{
	private static String opurl ="api/agent/getAgentPriceMarkupConfig";
	
	public getAgentPriceMarkupConfigCall() {
		super(EnvSetup.getSystemUrl("godmch_iapi"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public String getStatusCode1()
	{
	  return getString("status");
	}
	
	 public String getMessage()
	{
	 return getString("msg");
	}
	 
	public JSONArray getConditionList() throws JSONException
	{
		JSONArray jsonArray=new JSONObject(getString("result")).getJSONArray("conditionList");

		return jsonArray;
	
	}
	
	
	
	public JSONArray getGlobalConfig() throws JSONException
	{
		JSONArray jsonArray=new JSONObject(getString("result")).getJSONObject("globalConfig").getJSONArray("percentageList");

		return jsonArray;
	
	}
}